package com.linkhub.oms.admin.modules.stock.domain.dto;

import lombok.Data;

import java.io.Serializable;

/**
 * @Description: StockPreemptionResultDTO
 * @Author: echo
 * @Date: 2024/4/28 15:23
 * @Version: 1.0
 */
@Data
public class StockPreemptionResultDTO implements Serializable {

    private String sysOrderId;

    private boolean preemptionResult;


    public static StockPreemptionResultDTO createSuccessResult(String sysOrderId) {
        StockPreemptionResultDTO dto = new StockPreemptionResultDTO();
        dto.setSysOrderId(sysOrderId);
        dto.setPreemptionResult(true);
        return dto;
    }

    public static StockPreemptionResultDTO createFailResult(String sysOrderId) {
        StockPreemptionResultDTO dto = new StockPreemptionResultDTO();
        dto.setSysOrderId(sysOrderId);
        dto.setPreemptionResult(false);
        return dto;
    }
}
